]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: make .lock() and .unlock() idempotent
authorGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 17 Aug 2012 17:08:17 +0000 (19:08 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Fri, 17 Aug 2012 17:10:27 +0000 (19:10 +0200)
Those methods can be called multiple times in certain situations,
and will be even more so after hooking them to the system bus.

js/ui/screenShield.js

index f375417692593f768b7fe4fe44da77fafcf96ac5..c4a23b6e9070e2a0dabebe5ad6b19ecaaf4a0782 100644 (file)
@@ -616,11 +616,13 @@ const ScreenShield = new Lang.Class({
 
         this._lightbox.hide();
 
-        Main.popModal(this.actor);
-        this.actor.hide();
+        if (this._isModal) {
+            Main.popModal(this.actor);
+            this._isModal = false;
+        }
 
-        this._isModal = false;
         this._isLocked = false;
+        this.actor.hide();
 
         this.emit('lock-status-changed', false);
     },